export default {
  methods: {
    // key是按钮的标识
    checkPermission(key) {
      // 从vuex中获取points
      const {
        roles: {
          points
        }
      } = this.$store.getters.userInfo
      if (points && points.length > 0) {
        return points.includes(key)
      }
      return false
    }
  }
}
